package com.powermanager.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.powermanager.R;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by lqy on 16/7/7.
 */
public class EletricAnalyseAdapter extends RecyclerView.Adapter {
    private Context context;

    public EletricAnalyseAdapter(Context context) {
        this.context = context;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        MyViewHolder viewHolder = new MyViewHolder(LayoutInflater.from(context).inflate(R.layout.item_eletricanalyse, parent, false));
        return viewHolder;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
        MyViewHolder myViewHolder = (MyViewHolder) holder;
        myViewHolder.mTvName.setText("总路");

    }

    class MyViewHolder extends RecyclerView.ViewHolder {
        @Bind(R.id.mTvName)
        TextView mTvName;

        public MyViewHolder(View itemView) {
            super(itemView);
            ButterKnife.bind(this,itemView);
        }
    }

    @Override
    public int getItemCount() {
        return 5;
    }

}
